<template>
    <el-tabs type="border-card" v-model="tabs.activeName">
        <el-tab-pane name="first" label="基本信息">
            <InfoDetailBase :detailDialog.sync="detailDialog" @doRefresh="getList"> </InfoDetailBase>

            <pocesStart v-if="detailDialog.hasPoces" :detailDialog.sync="detailDialog" @doRefresh="getList"></pocesStart>

        </el-tab-pane>
        <el-tab-pane v-if="detailDialog.id" name="second" label="明细信息">
            <kriItem :detailDialog.sync="detailDialog"></kriItem>
        </el-tab-pane>

          <el-tab-pane v-if="detailDialog.id" name="second2" label="附件信息">
            <fileInfo 
            :detailDialog.sync="detailDialog"
            :majorTableDate.sync="majorTableDate"
            ></fileInfo>
        </el-tab-pane>
    </el-tabs>
</template>

<script>
    import pocesStart from "@/views/activiti/pocess/pocesStart.vue";
    import fileInfo from "../../grc/fileInfo";

    import  kriItem from "../item/index.vue";
    import  InfoDetailBase from "../Info/InfoDetailBase";

    export default {
        name: "InfoDetailTabs",
        props: {
            detailDialog: {
                type: Object,
                default: function() {
                    return {
                        // id
                        id: null,
                        open: null,
                        // 是否详情页
                        isDisabled: null,
                    }
                },
            },
        },

        components: {
            fileInfo,
            pocesStart,
            InfoDetailBase ,
             kriItem,

        },

        data() {
            return {
                tabs: {
                    activeName: "first",
                },
                majorTableDate: {
                    tableName:"ldc"
                }

            }
        },

        watch: {
            /* 监听打开状态 */
            "detailDialog.open": function(newOpen, oldOpen) {
                this.tabs.activeName = "first"
            },
        },
        methods: {
            getList() {

                this.$emit("doRefresh");
            },

        },
    }
</script>

<style>
</style>
